package com.example.example_mvp;

import android.text.TextUtils;

public class LoginModelImpl implements ILoginContract.ILoginModel {
    private static final String userName="liutong";
    private static final String Password="123456";

    @Override
    public void login(String name, String password, ICallback callback) {
        if (userName.equals(name) && Password.equals(password)){
            callback.receive(VailString.IsTrue);
        }else if (TextUtils.isEmpty(name.trim())||TextUtils.isEmpty(password.trim())){
            callback.receive(VailString.IsEmpty);
        }else {
            callback.receive(VailString.IsWrong);
        }
    }
}
